package com.cjst.service.impl.base;

import java.util.List;

import org.springframework.stereotype.Service;

import com.cjst.pojo.base.Article;
import com.cjst.service.base.ArticleService;
import com.cjst.sql.C;
import com.cjst.sql.Method;
import com.cjst.sql.WherePrams;

@Service
public class ArticleServiceImpl extends BaseServiceImpl<Article, String> implements ArticleService{
	@Override
	public List<Article> getArticleByType(Integer type){
		if(type!=null){
			WherePrams wheres=Method.where("isDelete", C.EQ, 0);
			wheres.and("type", C.EQ, type);
			wheres.orderBy("createTime desc");
			return this.list(wheres);
		}
		return null;
	}
}
